.language-selector {
  display: inline-block;
  margin: 0 0.3rem;
}

.Dropdown-root {
  position: relative;
}

.language-selector .Dropdown-control {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 200ms ease;
  padding: 0 0.3rem 0 0.5rem;
  border-radius: 0.25rem;
  background-color: var(--ifm-menu-color-background-hover);
}

.codeblock-header .language-selector .Dropdown-control {
  background: none;
}

.language-selector .Dropdown-control:hover {
  background-color: var(--convex-active-background);
}

.codeblock-header .language-selector .Dropdown-control:hover {
  background-color: var(--ifm-menu-color-background-hover);
}

.language-selector .Dropdown-control:after {
  display: inline-block;
  content: "";
  background: var(--ifm-menu-link-sublist-icon) 50% / 2rem 2rem;
  filter: var(--ifm-menu-link-sublist-icon-filter);
  transform: rotate(180deg);
  width: 1rem;
  height: 1rem;
}

.Dropdown-arrow {
  display: none;
}

.language-selector .Dropdown-menu {
  border-radius: 0.25rem;
  margin-top: 0.25rem;
  padding: 0.25rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: var(--convex-active-background);
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 1000;
  -webkit-overflow-scrolling: touch;
}

.language-selector .Dropdown-option {
  border-radius: 0.25rem;
  padding: 0rem 0.5rem;
  cursor: pointer;
}

.language-selector .Dropdown-option:hover {
  background-color: var(--ifm-menu-color-background-hover);
}
